package com.tingyuge.base.design.iterator;

/**
 * @Created by xiaodao
 */
public class Client {

    public static void main(String[] args) {
        ConcreteMyAggregate c = new ConcreteMyAggregate();
        c.add("11");
        c.add("2323");
        c.add(1223);

        MyIterator iterator = c.getIterator();
        while (iterator.hasNext()) {
            System.out.println(iterator.next());
        }
    }
}
